

/*
Respect the Process: The Public Cost of Unilateral Action in Comparative Perspective

Jonathan Chu and Scott Williamson

Replication of Appendix
*/



cd "[Insert your directory here]"


exit

************* TABLE A.1 summary statistics Table
clear
use cw_jop_usa.dta

summ age_lucid gender_lucid white college republican2 dem_important_3 approvecongress income
tab region // 1=ne 2=mw 3=south 4=w 


clear
use cw_jop_egypt.dta
summ year female muslim college pro_exec dem_important_3 approve_leg cairo_alex_giza neighborhood_income


************* TABLE A.2 Balance Checks

clear
use cw_jop_usa.dta

foreach v of varlist age_lucid gender_lucid white college republican3 dem_important_3 approvecongress approvetrump income {
	ttest `v', by(t_EO)
}


clear
use cw_jop_egypt.dta

foreach v of varlist year female muslim college pro_exec dem_important_3 approve_leg cairo_alex_giza neighborhood_income {
	ttest `v', by(t_EO)
}


************* TABLE A.3 Main Effects of Executive Order Treatment, USA

*columns 1 & 2 USA
clear
use cw_jop_usa.dta

reg approve7 t_EO, cluster(id)
reg approve7 t_EO age_lucid gender_lucid white college partisanship dem_important_3 approvecongress i.region, cluster(id)


*columns 3 & 4 egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO, cluster(id)
reg approve7 t_EO age gender muslim college pro_exec dem_important_3 approve_leg i.governorate, cluster(id)


************* TABLE A.4 Main Effects of Executive Order Treatment (Ordered Probit), USA

*columns 1 & 2 USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO, cluster(id)
oprobit approve7 t_EO age_lucid gender_lucid white college partisanship dem_important_3 approvecongress i.region, cluster(id)


*columns 1 & 2 Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO, cluster(id)
oprobit approve7 t_EO age gender muslim college pro_exec dem_important_3 approve_leg i.governorate, cluster(id)

************* TABLE A.5 Effects of Executive Order Treatment by Issue Type, USA
*columns 1 & 2 USA
clear
use cw_jop_usa.dta

reg approve7 t_EO if FP==0, cluster(id)
reg approve7 t_EO if FP==1, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO if FP==0, cluster(id)
reg approve7 t_EO if FP==1, cluster(id)


************* TABLE A.6 Effects of Executive Order Treatment by Issue Type (Ordered Probit), USA
*column 1 & 2
clear
use cw_jop_usa.dta

oprobit approve7 t_EO if FP==0, cluster(id)
oprobit approve7 t_EO if FP==1, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO if FP==0, cluster(id)
oprobit approve7 t_EO if FP==1, cluster(id)

************* TABLE A.7: Partisan Subgroup Effects of Executive Order Treatment, USA
*column 1 & 2
clear
use cw_jop_usa.dta

reg approve7 t_EO if party_align==2, cluster(id) // same party
reg approve7 t_EO if party_align==0, cluster(id) // cross party
reg approve7 t_EO if party_align==1, cluster(id) // no party


*column Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO if pro_exec==1, cluster(id) // Support Sisi
reg approve7 t_EO if pro_exec==0, cluster(id) // Oppose Sisi


************* TABLE A.8: Partisan Subgroup Effects of Executive Order Treatment (Ordered Probit), USA
*columns USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO if party_align==2, cluster(id) // same party
oprobit approve7 t_EO if party_align==0, cluster(id) // cross party
oprobit approve7 t_EO if party_align==1, cluster(id) // no party

*columns Egypt
clear
use cw_jop_egypt.dta


oprobit approve7 t_EO if pro_exec==1, cluster(id) // Support Sisi
oprobit approve7 t_EO if pro_exec==0, cluster(id) // Oppose Sisi


************* FIGURE A.1 Democracy Mechanism Based on Partisanship: USA

clear
use cw_jop_usa.dta

**left side
reg m_effective t_EO if co_party==0, cluster(id) 
estimates store a
reg m_credible t_EO if co_party==0, cluster(id) 
estimates store b
reg m_procedure t_EO if co_party==0, cluster(id) 
estimates store c
reg m_effective t_EO if co_party==1, cluster(id) 
estimates store a2
reg m_credible t_EO if co_party==1, cluster(id) 
estimates store b2
reg m_procedure t_EO if co_party==1, cluster(id) 
estimates store c2

coefplot ///
 (a, label ("Effective, not co-party") msymbol(square) msize(vlarge) mfcolor(white) color(eltblue) ciopts(recast(rcap) color(eltblue)) ) ///
 (b, label ("Durable, not co-party") msymbol(square) msize(vlarge) mfcolor(white)  color(emidblue) ciopts(recast(rcap) color(emidblue)) ) ///
 (c, label ("Democratic, not co-party") msymbol(square) msize(vlarge) mfcolor(white)  color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
  (a2, label ("Effective, co-party") msymbol(square) msize(vlarge) color(eltblue) ciopts(recast(rcap) color(eltblue)) ) ///
 (b2, label ("Durable, co-party") msymbol(square) msize(vlarge) color(emidblue) ciopts(recast(rcap) color(emidblue)) ) ///
 (c2, label ("Democratic, co-party") msymbol(square) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1.5(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(12) name(a1_mechanism_party, replace)


**right side
reg approve7 t_EO if t_poll==0 & co_party==0, cluster(id)
estimates store a
reg approve7 t_EO if t_poll==1 & co_party==0, cluster(id)
estimates store b
reg approve7 t_EO if t_poll==0 & co_party==1, cluster(id)
estimates store a2
reg approve7 t_EO if t_poll==1 & co_party==1, cluster(id)
estimates store b2

coefplot ///
 (a, offset(0.3) label ("No Poll, Not co-party") msymbol(square) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (b,  offset(0.1)  label ("Yes Poll, Not co-party") msymbol(square) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
  (a2, offset(-0.1) label ("No Poll, Co-party") msymbol(triangle) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (b2,  offset(-0.3)  label ("Yes Poll, Co-party") msymbol(triangle) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(12)  name(poll_party, replace)



************* FIGURE A.2 Democracy Mechanism Based on Partisanship: Egypt

clear
use cw_jop_egypt.dta


**Left side 
reg approve7 t_EO if t_poll==0 & pro_exec==0, cluster(id)
estimates store a
reg approve7 t_EO if t_poll==1 & pro_exec==0, cluster(id)
estimates store b
reg approve7 t_EO if t_poll==0 & pro_exec==1, cluster(id)
estimates store a2
reg approve7 t_EO if t_poll==1 & pro_exec==1, cluster(id)
estimates store b2

coefplot ///
 (a, offset(0.3) label ("No Poll, Oppose Sisi") msymbol(square) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (b,  offset(0.1)  label ("Yes Poll, Oppose Sisi") msymbol(square) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
  (a2, offset(-0.1) label ("No Poll, Support Sisi") msymbol(triangle) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (b2,  offset(-0.3)  label ("Yes Poll, Support Sisi") msymbol(triangle) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black*0.7) lp(dash) ) ///
xtitle( "Executive Decree - Legislature", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(12)  name(EO_Poll_EGYPT, replace)


**right side
reg m_effective t_EO if pro_exec==0, cluster(id) 
estimates store a
reg m_credible t_EO if pro_exec==0, cluster(id) 
estimates store b
reg m_procedure t_EO if pro_exec==0, cluster(id) 
estimates store c
reg m_effective t_EO if pro_exec==1, cluster(id) 
estimates store a2
reg m_credible t_EO if pro_exec==1, cluster(id) 
estimates store b2
reg m_procedure t_EO if pro_exec==1, cluster(id) 
estimates store c2

coefplot ///
  (a, label ("Effective, Oppose Sisi") msymbol(square) msize(vlarge) mfcolor(white) color(eltblue) ciopts(recast(rcap) color(eltblue)) ) ///
 (b, label ("Durable, Oppose Sisi") msymbol(square) msize(vlarge) mfcolor(white)  color(emidblue) ciopts(recast(rcap) color(emidblue)) ) ///
 (c, label ("Democratic, Oppose Sisi") msymbol(square) msize(vlarge) mfcolor(white)  color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
  (a2, label ("Effective, Support Sisi") msymbol(square) msize(vlarge) color(eltblue) ciopts(recast(rcap) color(eltblue)) ) ///
 (b2, label ("Durable, Support Sisi") msymbol(square) msize(vlarge) color(emidblue) ciopts(recast(rcap) color(emidblue)) ) ///
 (c2, label ("Democratic, Support Sisi") msymbol(square) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black*0.7) lp(dash) ) ///
xtitle( "Executive Decree - Legislature", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1.0(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(16) name(mechanisms_EGYPT, replace)


************* TABLE A.9: Educational Subgroup Effects of Executive Order Treatment
*columns USA
clear
use cw_jop_usa.dta

reg approve7 t_EO if college==1, cluster(id)
reg approve7 t_EO if college==0, cluster(id)
reg approve7 t_EO college t_EO_college, cluster(id)


*columns Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO if college==1, cluster(id)
reg approve7 t_EO if college==0, cluster(id)
reg approve7 t_EO college t_EO_college, cluster(id)


************* TABLE A.10: Educational Subgroup Effects of Executive Order Treatment (Ordered Probit)
*columns USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO if college==1, cluster(id)
oprobit approve7 t_EO if college==0, cluster(id)
oprobit approve7 t_EO college t_EO_college, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO if college==1, cluster(id)
oprobit approve7 t_EO if college==0, cluster(id)
oprobit approve7 t_EO college t_EO_college, cluster(id)


************* TABLE A.11: Main Effects of Executive Order Treatment on Mechanism Outcomes
*columns USA
clear
use cw_jop_usa.dta

reg m_effective t_EO, cluster(id)
reg m_credible t_EO, cluster(id)
reg m_procedure t_EO, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

reg m_effective t_EO, cluster(id)
reg m_credible t_EO, cluster(id)
reg m_procedure t_EO, cluster(id)


************* TABLE A.12: Main Effects of Executive Order Treatment on Mechanism Outcomes (ordered probit)
*columns USA
clear
use cw_jop_usa.dta

oprobit m_effective t_EO, cluster(id)
oprobit m_credible t_EO, cluster(id)
oprobit m_procedure t_EO, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

oprobit m_effective t_EO, cluster(id)
oprobit m_credible t_EO, cluster(id)
oprobit m_procedure t_EO, cluster(id)


************* TABLE A.13: Effects of Executive Order Treatment With and Without Opinion Poll
*columns USA
clear
use cw_jop_usa.dta

reg approve7 t_EO if t_poll==1, cluster(id)
reg approve7 t_EO if t_poll==0, cluster(id)
reg approve7 t_EO t_poll t_EO_poll, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO if t_poll==1, cluster(id)
reg approve7 t_EO if t_poll==0, cluster(id)
reg approve7 t_EO t_poll t_EO_poll, cluster(id)


************* TABLE A.14: Effects of Executive Order Treatment With and Without Opinion Poll (Ordered Probit)
*columns USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO if t_poll==1, cluster(id)
oprobit approve7 t_EO if t_poll==0, cluster(id)
oprobit approve7 t_EO t_poll t_EO_poll, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO if t_poll==1, cluster(id)
oprobit approve7 t_EO if t_poll==0, cluster(id)
oprobit approve7 t_EO t_poll t_EO_poll, cluster(id)


************* TABLE A.15: Democracy Importance Subgroup Effects of Executive Order Treatment
*columns USA
clear
use cw_jop_usa.dta

reg approve7 t_EO if dem_important_3==3, cluster(id)
reg approve7 t_EO if dem_important_3==2, cluster(id)
reg approve7 t_EO if dem_important_3==1, cluster(id)

*columns Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO if dem_important_3==3, cluster(id)
reg approve7 t_EO if dem_important_3==2, cluster(id)
reg approve7 t_EO if dem_important_3==1, cluster(id)



************* TABLE A.16: Democracy Importance Interaction with Executive Order Treatment
*columns USA
clear
use cw_jop_usa.dta

reg approve7 t_EO##dem_important_3, cluster(id)

*Egypt
clear
use cw_jop_egypt.dta

reg approve7 t_EO##dem_important_3, cluster(id)


************* TABLE A.17: Democracy Importance Subgroup Effects of Executive Order Treatment  (Ordered Probit)
*columns USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO if dem_important_3==3, cluster(id)
oprobit approve7 t_EO if dem_important_3==2, cluster(id)
oprobit approve7 t_EO if dem_important_3==1, cluster(id)

*Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO if dem_important_3==3, cluster(id)
oprobit approve7 t_EO if dem_important_3==2, cluster(id)
oprobit approve7 t_EO if dem_important_3==1, cluster(id)


************* TABLE A.18: Democracy Importance Interaction with Executive Order Treatment  (Ordered Probit)
*columns USA
clear
use cw_jop_usa.dta

oprobit approve7 t_EO##dem_important_3, cluster(id)

*Egypt
clear
use cw_jop_egypt.dta

oprobit approve7 t_EO##dem_important_3, cluster(id)



************* TABLE A.19: Executive Order Treatment Effects with Positive Attitudes toward Executive

reg approve7 t_EO if pro_executive_pca_binary==1, cluster(id)
reg approve7 t_EO if trust_army_binary==1, cluster(id)
reg approve7 t_EO if trust_security_binary==1, cluster(id)
reg approve7 t_EO if gov_covid_effective==1, cluster(id)
reg approve7 t_EO if gov_covid_honest==1, cluster(id)


************* TABLE A.20: Executive Order Treatment Effects with Negative Attitudes toward Executive

reg approve7 t_EO if pro_executive_pca_binary==0, cluster(id)
reg approve7 t_EO if trust_army_binary==0, cluster(id)
reg approve7 t_EO if trust_security_binary==0, cluster(id)
reg approve7 t_EO if gov_covid_effective==0, cluster(id)
reg approve7 t_EO if gov_covid_honest==0, cluster(id)



************* TABLE A.21: Fully Saturated Model with US Sample
clear
use cw_jop_usa.dta

reg approve7 t_EO t_poll t_republican_fp t_intl_border ///
t_EO_poll t_EO_republican_fp t_EO_border t_poll_republican_fp t_poll_border t_rep_border ///
t_EO_poll_republican_fp t_poll_rep_border t_rep_border_EO ///
t_EO_poll_rep_border if FP==1


reg approve7 t_EO t_poll t_republican_dom t_dom_marijuana ///
t_EO_poll t_EO_republican_dom t_EO_marijuana t_poll_republican_dom t_poll_marijuana t_republican_marijuana ///
t_EO_poll_republican_dom t_poll_rep_marijuana t_rep_marijuana_EO ///
t_EO_poll_rep_marij if FP==0


************* FIGURE A.3: Conditional Average Treatment Effects: USA

reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the Democratic" & t_dom_marijuana==0
estimates store a
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the Democratic" & t_dom_marijuana==0
estimates store b
reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the Democratic" & t_dom_marijuana==1
estimates store a2
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the Democratic" & t_dom_marijuana==1
estimates store b2

reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the Democratic" & t_intl_border==0
estimates store c
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the Democratic" & t_intl_border==0
estimates store d
reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the Democratic" & t_intl_border==1
estimates store c2
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the Democratic" & t_intl_border==1
estimates store d2

reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the Republican" & t_dom_marijuana==0
estimates store e
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the Republican" & t_dom_marijuana==0
estimates store f
reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the Republican" & t_dom_marijuana==1
estimates store e2
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the Republican" & t_dom_marijuana==1
estimates store f2

reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the Republican" & t_intl_border==0
estimates store g
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the Republican" & t_intl_border==0
estimates store h
reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the Republican" & t_intl_border==1
estimates store g2
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the Republican" & t_intl_border==1
estimates store h2


reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the" & t_dom_marijuana==0
estimates store e3
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the" & t_dom_marijuana==0
estimates store f3
reg approve7 t_EO if t_poll==0 & FP==0 & jones_party=="the" & t_dom_marijuana==1
estimates store e4
reg approve7 t_EO if t_poll==1 & FP==0 & jones_party=="the" & t_dom_marijuana==1
estimates store f4

reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the" & t_intl_border==0
estimates store g3
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the" & t_intl_border==0
estimates store h3
reg approve7 t_EO if t_poll==0 & FP==1 & davis_party=="the" & t_intl_border==1
estimates store g4
reg approve7 t_EO if t_poll==1 & FP==1 & davis_party=="the" & t_intl_border==1
estimates store h4


coefplot ///
 (a, offset(0.35) label ("No Poll, Tax, Dem (N=108)") msymbol(square) msize(vlarge) mfcolor(white) color(blue) ciopts(recast(rcap) color(blue)) ) ///
 (b,  offset(0.25)  label ("Poll Displayed, Tax, Dem (N=111)") msymbol(square) msize(vlarge) color(blue) ciopts(recast(rcap) color(blue)) ) ///
  (a2, offset(0.15) label ("No Poll, Marijuana, Dem (N=100)") msymbol(square) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (b2,  offset(0.05)  label ("Poll Displayed, Marijuana, Dem (N=113)") msymbol(square) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
  (c, offset(-0.05) label ("No Poll, Intervention, Dem (N=106)") msymbol(triangle) msize(vlarge) mfcolor(white) color(blue) ciopts(recast(rcap) color(blue)) ) ///
 (d,  offset(-0.15)  label ("Poll Displayed, Intervention, Dem (N=105)") msymbol(triangle) msize(vlarge) color(blue) ciopts(recast(rcap) color(blue)) ) ///
 (c2, offset(-0.25) label ("No Poll, Border, Dem (N=113)") msymbol(triangle) msize(vlarge) mfcolor(white) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
 (d2,  offset(-0.35)  label ("Poll Displayed, Border, Dem (N=103)") msymbol(triangle) msize(vlarge) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1.5(0.5)1.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(10) ysize(20)  name(EO_Poll_dem, replace)

coefplot ///
  (e, offset(0.35) label ("No Poll, Tax, Rep (N=108)") msymbol(square) msize(vlarge) mfcolor(white) color(red) ciopts(recast(rcap) color(red)) ) ///
 (f,  offset(0.25)  label ("Poll Displayed, Tax, Rep (N=108)") msymbol(square) msize(vlarge) color(red) ciopts(recast(rcap) color(red)) ) ///
 (e2, offset(0.15) label ("No Poll, Marijuana, Rep (N=104)") msymbol(square) msize(vlarge) mfcolor(white) color(maroon) ciopts(recast(rcap) color(maroon)) ) ///
 (f2,  offset(0.05)  label ("Poll Displayed, Marijuana, Rep (N=115)") msymbol(square) msize(vlarge) color(maroon) ciopts(recast(rcap) color(maroon)) ) ///
  (g, offset(-0.05) label ("No Poll, Intervention, Rep (N=98)") msymbol(triangle) msize(vlarge) mfcolor(white) color(red) ciopts(recast(rcap) color(red)) ) ///
 (h,  offset(-0.15)  label ("Poll Displayedd, Intervention, Rep (N=95)") msymbol(triangle) msize(vlarge) color(red) ciopts(recast(rcap) color(red)) ) ///
   (g2, offset(-0.25) label ("No Poll, Border, Rep (N=124)") msymbol(triangle) msize(vlarge) mfcolor(white) color(maroon) ciopts(recast(rcap) color(maroon)) ) ///
 (h2,  offset(-0.35)  label ("Poll Displayed, Border, Rep (N=117)") msymbol(triangle) msize(vlarge) color(maroon) ciopts(recast(rcap) color(maroon)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1.5(0.5)1.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(10) ysize(20)  name(EO_Poll_rep, replace)


coefplot ///
  (e3, offset(0.35) label ("No Poll, Tax, No party (N=112)") msymbol(square) msize(vlarge) mfcolor(white) color(green) ciopts(recast(rcap) color(green)) ) ///
 (f3,  offset(0.25)  label ("Poll Displayed, Tax, No party (N=102)") msymbol(square) msize(vlarge) color(green) ciopts(recast(rcap) color(green)) ) ///
 (e4, offset(0.15) label ("No Poll, Marijuana, No party (N=112)") msymbol(square) msize(vlarge) mfcolor(white) color(forest) ciopts(recast(rcap) color(forest)) ) ///
 (f4,  offset(0.05)  label ("Poll Displayed, Marijuana, No party (N=106)") msymbol(square) msize(vlarge) color(forest) ciopts(recast(rcap) color(forest)) ) ///
  (g3, offset(-0.05) label ("No Poll, Intervention, No party (N=126)") msymbol(triangle) msize(vlarge) mfcolor(white) color(green) ciopts(recast(rcap) color(green)) ) ///
 (h3,  offset(-0.15)  label ("Poll Displayedd, Intervention, No party (N=116)") msymbol(triangle) msize(vlarge) color(green) ciopts(recast(rcap) color(green)) ) ///
   (g4, offset(-0.25) label ("No Poll, Border, No party (N=88)") msymbol(triangle) msize(vlarge) mfcolor(white) color(forest) ciopts(recast(rcap) color(forest)) ) ///
 (h4,  offset(-0.35)  label ("Poll Displayed, Border, No party (N=108)") msymbol(triangle) msize(vlarge) color(forest) ciopts(recast(rcap) color(forest)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1.5(0.5)1.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(10) ysize(20)  name(EO_Poll_noparty, replace)



************* TABLE A.22:  Fully Saturated Model with Egypt Sample
clear
use cw_jop_egypt.dta

reg approve7 t_EO t_poll t_russia ///
 t_EO_poll t_EO_russia t_poll_russia t_EO_poll_russia if FP==1

 reg approve7 t_EO t_poll t_wage ///
 t_EO_poll t_EO_wage t_poll_wage t_EO_poll_wage if FP==0
 

************* Figure A.4: Conditional Average Treatment Effects: Egypt

reg approve7 t_EO if FP==0 & t_poll == 0 & domestic_issue == "Cig"
estimates store a
reg approve7 t_EO if FP==1 & t_poll == 0 & foreign_issue == "Libya"
estimates store b
reg approve7 t_EO if FP==0 & t_poll == 0 & domestic_issue == "Wage"
estimates store a2
reg approve7 t_EO if FP==1 & t_poll == 0 & foreign_issue == "Russia"
estimates store b2
reg approve7 t_EO if FP==0 & t_poll == 1 & domestic_issue == "Cig"
estimates store c
reg approve7 t_EO if FP==1 & t_poll == 1 & foreign_issue == "Libya"
estimates store d
reg approve7 t_EO if FP==0 & t_poll == 1 & domestic_issue == "Wage"
estimates store c2
reg approve7 t_EO if FP==1 & t_poll == 1 & foreign_issue == "Russia"
estimates store d2

coefplot ///
 (a, offset(0.35) label ("No poll, Cigarettes (N=389)") msymbol(square) msize(vlarge) mfcolor(white)  color("105 185 51") ciopts(recast(rcap) color("105 185 51")) ) ///
 (c, offset(0.25) label ("Poll Displayed, Cigarettes (N=352)") msymbol(square) msize(vlarge) color("105 185 51") ciopts(recast(rcap) color("105 185 51")) ) ///
 (a2, offset(0.15) label ("No poll, Wages (N=357)") msymbol(triangle) msize(vlarge) mfcolor(white)  color("105 185 51") ciopts(recast(rcap) color("105 185 51")) ) ///
  (c2, offset(0.05) label ("Poll Displayed, Wages (N=364)") msymbol(triangle) msize(vlarge) color("105 185 51") ciopts(recast(rcap) color("105 185 51")) ) ///
 (b,  offset(-0.05)  label ("No poll, Libya (N=400)") msymbol(square) msize(vlarge) mfcolor(white)  color("64 105 166") ciopts(recast(rcap) color("64 105 166")) ) ///
 (d,  offset(-0.15)  label ("Poll Displayed, Libya (N=356)") msymbol(square) msize(vlarge) color("64 105 166") ciopts(recast(rcap) color("64 105 166")) ) ///
 (b2,  offset(-0.25)  label ("No poll, Russian Arms (N=333)") msymbol(triangle) mfcolor(white)  msize(vlarge) color("64 105 166") ciopts(recast(rcap) color("64 105 166")) ) ///
 (d2,  offset(-0.35)  label ("Poll Displayed, Russian Arms (N=370)") msymbol(triangle) msize(vlarge) color("64 105 166") ciopts(recast(rcap) color("64 105 166")) ) ///
, drop(_cons) xline(0, lcolor(black*0.7) lp(dash) ) ///
xtitle( "Executive Order - Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-1(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(20) name(EO_FP_EGYPT, replace)


************* TABLE A.23: Mediation Results
**USA Column
clear
use cw_jop_usa.dta

medeff (regress m_effective t_EO ) /// 
(regress approve7 t_EO m_effective age_lucid gender_lucid white education republican3 dem_important_3 approvecongress) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_effective) seed(1012)

medeff (regress m_credible t_EO ) /// 
(regress approve7 t_EO m_credible  age_lucid gender_lucid white education republican3 dem_important_3 approvecongress) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_credible) seed(1012)

medeff (regress m_procedure t_EO ) /// 
(regress approve7 t_EO m_procedure  age_lucid gender_lucid white education republican3 dem_important_3 approvecongress) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_procedure) seed(1012)


**Egypt Column
clear
use cw_jop_egypt.dta

medeff (regress m_effective t_EO ) /// 
(regress approve7 t_EO m_effective age gender education dem_important_3 approve_leg) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_effective) seed(1012)

medeff (regress m_credible t_EO ) /// 
(regress approve7 t_EO m_credible age gender education dem_important_3 approve_leg) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_credible) seed(1012)

medeff (regress m_procedure t_EO ) /// 
(regress approve7 t_EO m_procedure age gender education dem_important_3 approve_leg) , ///
vce(cluster id) ///
treat(t_EO) mediate(m_procedure) seed(1012)




/* RUN THIS CODE BEFORE MOVING TO THE NEXT FIGURE - USA Follow-Up Study #1

clear
use cw_jop_usa_followup1.dta
*/



************* FIGURE A.5: Main Effects Relative to Pure Control Reflect Results in Main Paper

reg dv_domestic_approve7 t_exec_con_dom
estimates store a
reg dv_domestic_approve7 t_leg_con_dom
estimates store b

reg dv_intl_approve7 t_exec_con_intl
estimates store c
reg dv_intl_approve7 t_leg_con_intl
estimates store d

coefplot ///
(a, label(Executive Order - Domestic) offset(-0.25) msymbol(square) msize(vlarge) mlcolor(ebblue) mfcolor(ebblue) ciopts(color(ebblue) recast(rcap) )) ///
(b, label(Legislation - Domestic) offset(0.25) msymbol(square) msize(vlarge) mlcolor(ebblue) mfcolor(white) ciopts(color(ebblue) recast(rcap) )) ///
(c, label(Executive Order - Foreign) offset(-0.25)  msymbol(square) msize(vlarge) mlcolor(cranberry) mfcolor(cranberry) ciopts(color(cranberry) recast(rcap) )) ///
(d, label(Legislation - Foreign) offset(0.25) msymbol(square) msize(vlarge) mlcolor(cranberry) mfcolor(white) ciopts(color(cranberry) recast(rcap) )) ///
, ///
drop(_cons) ///
xtitle("Change in Approval vs Control Group", margin(medsmall) )  ///
xline(0, lcolor(black) lp(dash)) xlabel(-1(0.25)0.25) xscale(noextend) ///
ylabel( , nogrid glcolor(white) ) yscale(off) ///
graphregion(fcolor(white) lcolor(white) color(white) ) plotregion(color(white)) bgcolor(white) ///
legend ( position(11) region( lcolor(white)) col(1)) ///
xsize(20) ysize(20) ///
name(figure_a5, replace)


************* FIGURE A.6: Negative Executive Order Effects Persist with Real US Presidents

reg dv_approve7 t_exec_leg if co_party==0 & t_realname ==0, cluster(id)
estimates store a
reg dv_approve7 t_exec_leg if co_party==0 & t_realname ==1, cluster(id)
estimates store b

reg dv_approve7 t_exec_leg if co_party==1 & t_realname ==0, cluster(id)
estimates store c
reg dv_approve7 t_exec_leg if co_party==1 & t_realname ==1, cluster(id)
estimates store d

coefplot ///
(a, label(Not co-party, Hypothetical) msymbol(square) msize(vlarge) mlcolor(green*1.1) mfcolor(green*1.1) ciopts(color(green*1.1) recast(rcap) )) ///
(b, label(Not co-party, Real Name) msymbol(square) msize(vlarge) mlcolor(green*1.1) mfcolor(white) ciopts(color(green*1.1) recast(rcap) )) ///
(c, label(Co-party, Hypothetical) msymbol(square) msize(vlarge) mlcolor(orange) mfcolor(orange) ciopts(color(orange) recast(rcap) )) ///
(d, label(Co-party, Real Name) msymbol(square) msize(vlarge) mlcolor(orange) mfcolor(white) ciopts(color(orange) recast(rcap) )) ///
, ///
drop(_cons) ///
xtitle("Executive Order Effect on Approval", margin(medsmall) )  ///
xline(0, lcolor(black) lp(dash)) xlabel(-1(0.25)0.25) xscale(noextend) ///
ylabel( , nogrid glcolor(white) ) yscale(off) ///
graphregion(fcolor(white) lcolor(white) color(white) ) plotregion(color(white)) bgcolor(white) ///
legend ( position(11) region( lcolor(white)) col(1)) ///
xsize(20) ysize(20) ///
name(figure_a6, replace)



/* RUN THIS CODE BEFORE MOVING TO THE NEXT FIGURE - USA Follow-Up Study #2

clear
use cw_jop_usa_followup2.dta
*/

************* FIGURE A.7: Negative Executive Order Effects Persist in US Follow-Up 2

reg approve7 t_EO_without if t_EO_only !=1, cluster (id)
est store a
reg m_effective t_EO_without if t_EO_only !=1, cluster (id)
est store b
reg m_credible t_EO_without if t_EO_only !=1, cluster (id)
est store c
reg m_procedure t_EO_without if t_EO_only !=1, cluster (id)
est store d

coefplot ///
 (a, offset(0.3) label ("Overall Approval") msymbol(square) msize(large) color(cranberry*1.2) ciopts(recast(rcap) color(cranberry*1.2)) ) /// 
 (b,  offset(0.1)  label ("Effective") msymbol(square) msize(large) color(teal) ciopts(recast(rcap) color(teal)) ) ///
 (c, offset(-0.1) label ("Durable") msymbol(square) msize(large) color(orange) ciopts(recast(rcap) color(orange)) ) ///
 (d,  offset(-0.3)  label ("Democratic") msymbol(square) msize(large) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Exec Order without Congress", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-2.0(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(12)  name(Summary_findings_EO_without, replace)

reg approve7 t_EO_only if t_EO_without !=1, cluster (id)
est store a2
reg m_effective t_EO_only if t_EO_without !=1, cluster (id)
est store b2
reg m_credible t_EO_only if t_EO_without !=1, cluster (id)
est store c2
reg m_procedure t_EO_only if t_EO_without !=1, cluster (id)
est store d2

coefplot ///
 (a2, offset(0.3) label ("Overall Approval") msymbol(square) msize(large) color(cranberry*1.2) ciopts(recast(rcap) color(cranberry*1.2)) ) /// 
 (b2,  offset(0.1)  label ("Effective") msymbol(square) msize(large) color(teal) ciopts(recast(rcap) color(teal)) ) ///
 (c2, offset(-0.1) label ("Durable") msymbol(square) msize(large) color(orange) ciopts(recast(rcap) color(orange)) ) ///
 (d2,  offset(-0.3)  label ("Democratic") msymbol(square) msize(large) color(edkblue) ciopts(recast(rcap) color(edkblue)) ) ///
, drop(_cons) xline(0, lcolor(black) lp(dash) ) ///
xtitle( "Exec Order (Congress not mentioned)", size (large) margin(medsmall)) ///
graphregion(fcolor(white) lcolor(white)) bgcolor(white) ///
yscale(off) xscale (line noextend) xlab(-2.0(0.5)0.5) ///
legend (region(lcolor(white))  pos (11) col(1) ) xsize(12) ysize(12)  name(Summary_findings_EO_only, replace)

graph combine Summary_findings_EO_without Summary_findings_EO_only, graphregion(color(white))


/* RUN THIS CODE BEFORE MOVING TO THE NEXT ANALYSIS - BAROMETER DATA

clear
use barometer_data.dta
*/


************* Table A.25: Perception That Legislature Has Low Influence Correlates with Lower Approval of Executive, More Protest, and Lower Ratings of Country's Democracy

* Column 1 - Approval of Executive
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 2 - Refrain from Protesting
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 3 - Ratings of Democracy
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)

************* Table A.26: Perceived Legislative Influence with Logistic Regression

* Column 1 - Approval of Executive
logit gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 2 - Protest Participation
logit protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 3 - Ratings of Democracy
logit dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)

************* Table A.27: Perceived Legislative Influence and Approval of Executive

* Column 1 - Full Data
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 2 - Afro Barometer
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Afro", vce(cluster country_id)
* Column 3 - Arab Barometer
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Arab", vce(cluster country_id)
* Column 4 - Asian Barometer
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Asian", vce(cluster country_id)
* Column 5 - Non-Democracies
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==0, vce(cluster country_id)
* Column 6 - Democracies
reg gov_perf_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==1, vce(cluster country_id)

************* Table A.28: Perceived Legislative Influence and Protest Participation

* Column 1 - Full Data
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 2 - Afro Barometer
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Afro", vce(cluster country_id)
* Column 3 - Arab Barometer
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Arab", vce(cluster country_id)
* Column 4 - Asian Barometer
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Asian", vce(cluster country_id)
* Column 5 - Non-Democracies
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==0, vce(cluster country_id)
* Column 6 - Democracies
reg protest par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==1, vce(cluster country_id)

************* Table A.29: Perceived Legislative Influence and Rating of Democracy

* Column 1 - Full Data
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year i.barometer_id, vce(cluster country_id)
* Column 2 - Afro Barometer
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Afro", vce(cluster country_id)
* Column 3 - Arab Barometer
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Arab", vce(cluster country_id)
* Column 4 - Asian Barometer
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if barometer=="Asian", vce(cluster country_id)
* Column 5 - Non-Democracies
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==0, vce(cluster country_id)
* Column 6 - Democracies
reg dem_binary par_weak_binary econ_good safe trust_par voted internet_user dem_best critics_free male college christian i.country_id i.year if fh_binary==1, vce(cluster country_id)


/* RUN THIS CODE BEFORE MOVING TO THE NEXT ANALYSIS - BAROMETER SURVEY-LEVEL DATA

clear
use barometer_survey_level_data.dta
*/

* Approval of Executive
corr approve_executive legislature_weak
reg approve_executive legislature_weak
reg approve_executive legislature_weak i.barometer_id, vce(cluster country_id)

* Protest Participation
corr no_protest legislature_weak
reg no_protest legislature_weak
reg no_protest legislature_weak i.barometer_id, vce(cluster country_id)

* Rating of Democracy
corr democracy legislature_weak
reg democracy legislature_weak
reg democracy legislature_weak i.barometer_id, vce(cluster country_id)


************* Main Paper Footnote 7: V-Dem Statistic to Inform Case Selection

clear
insheet using "vdem_case_data.csv"

tabulate v2x_regime
generate autocracy = 1 if v2x_regime==0|v2x_regime==1
replace autocracy = 0 if autocracy!=1&v2x_regime!=.

generate democracy = 1 if v2x_regime==2|v2x_regime==3
replace democracy = 0 if democracy!=1&v2x_regime!=.

** Legislative constraint scores among autocracies and democracies

summarize v2xlg_legcon if (year==2015|year==2016|year==2017|year==2018|year==2019)&autocracy==1, detail
summarize v2xlg_legcon if (year==2015|year==2016|year==2017|year==2018|year==2019)&autocracy==1&country_name=="Egypt", detail

summarize v2xlg_legcon if (year==2015|year==2016|year==2017|year==2018|year==2019)&democracy==1, detail
summarize v2xlg_legcon if (year==2015|year==2016|year==2017|year==2018|year==2019)&democracy==1&country_name=="United States of America", detail
